package com.wzweb.entity;

import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.wzweb.dao.util.DBParse;

public class VideoInfosParse implements DBParse {
	@Override
	public Object parseEntity(ResultSet rs) throws Exception {

		Videoinfos video = new Videoinfos();

		video.setVideoInfoID(rs.getInt("VideoInfoID"));
		video.setVideoGroupID(rs.getInt("VideoGroupID"));
		video.setUserID(rs.getInt("UserID"));
		video.setDescription(rs.getString("Description"));
		video.setDuration(rs.getDouble("Duration"));
		video.setIsDeleted(rs.getInt("IsDeleted"));
		video.setTitle(rs.getString("Title"));
		video.setVideoImage(rs.getString("VideoImage"));
		video.setVideoPath(rs.getString("VideoPath"));
		video.setAddTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
				.format(new Date()));
		video.setTag1(rs.getString("Tag1"));
		video.setTag2(rs.getString("Tag2"));
		video.setTag3(rs.getString("Tag3"));
		video.setTag4(rs.getString("Tag4"));
		video.setTag5(rs.getString("Tag5"));
		return video;
	}
}
